<?php

/**
 * @author shuang
 * @date 2016-10-27 11:23:54
 */
use yii\helpers\Url;

$this->title = "追加任务数量";
$this->registerCssFile("/css/validate.css");
$this->registerCssFile("/js/ui-dialog.css");
$this->registerJsFile("/js/jquery.form.min.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJsFile("/js/Validform_v5.3.2_min.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJsFile("/js/WdatePicker.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJsFile("/js/dialog-plus-min.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJsFile("/js/common.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJs('AjaxInitForm("#addTaskNOForm", "#btnSubmit", 1);');
echo $this->render("//layouts/breadcrumb", ["url" => Url::toRoute(["zhuijia", "id" => $id]), "title" => "追加任务数量"]);
?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12 well ibox float-e-margins">
            <div class="ibox-title">追加任务数量</div>
            <div class="well-content ibox-content">
                <form name="addTaskNOForm" method="post" action="<?php echo Url::toRoute(["zhuijia", "id" => $id]) ?>" id="addTaskNOForm" class="form-horizontal form-bordered" url="<?php echo Url::toRoute(["zhuijia", "id" => $id]) ?>">
                    <div class="panel-body panel-body-nopadding">
                        <input type="hidden" name="hidid" id="hidid" value="<?php echo $id; ?>" />
                        <div class="control-group">
                            <label class="control-label">功能选择</label>
                            <div class="controls">
                                <div class="btn-group">
                                    <a class="btn  btn-primary" href="<?php echo Url::toRoute(["zhuijia", "id" => $id]); ?>">追加</a>
                                    <a class="btn btn-default" href="<?php echo Url::toRoute(["xiansu", "id" => $id]); ?>">限速</a> 
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">任务名称标题</label>
                        <div class="controls text">
                            <?php echo $model->title; ?>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">详情</label>
                        <div class="controls">
                            <?php if ($model->publicode): ?>
                                公众号：<?php echo $model->publicode; ?><br/>
                            <?php endif; ?>
                            <?php if ($model->vote_address): ?>
                                投票链接：<?php echo $model->vote_address; ?><br/>
                            <?php endif; ?>
                            <?php if ($model->description): ?>
                                描述：<?php echo $model->description; ?>
                            <?php endif; ?>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">单价</label>
                        <div class="controls text"><?php echo $model->priceID->price; ?></div>
                    </div>
                    <div class="control-group">
                        <label for="disabledinput" class="col-sm-3 control-label">追加数量</label>
                        <div class="controls">
                            <input type="text" name="number" id="num" value="0" class="span3" datatype="n" nullmsg="请输入数量" errormsg="必须为数字" sucmsg=" " />
                            （如不需要追加填写0即可）
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">终止时间（选填）</label>
                        <div class="controls">
                            <input name="end_at" type="text" id="endtime" class="span3" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss'})" errormsg="请选择正确的日期" datatype="/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/" nullmsg="" sucmsg=" " />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label"></label>
                        <div class="controls">
                            <input name="btnSubmit" id="btnSubmit" type="submit" class="span2 btn lightblue" value="提交" />
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>